class PageModel<T> {
  List<T>? records;
  int? total;
  int? size;
  int? current;
  bool? searchCount;
  int? pages;

  PageModel(
      {this.records,
      this.total,
      this.size,
      this.current,
      this.searchCount,
      this.pages});

  PageModel.fromJson(Map<String, dynamic> json) {
    if (json['records'] != null) {
      records = [];
      json['records'].forEach((v) {
        records!.add(v);
      });
    }
    total = json['total'];
    size = json['size'];
    current = json['current'];
    searchCount = json['searchCount'];
    pages = json['pages'];
  }
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.records != null) {
      data['records'] = this.records!.toList();
    }
    data['total'] = this.total;
    data['size'] = this.size;
    data['current'] = this.current;
    data['searchCount'] = this.searchCount;
    data['pages'] = this.pages;
    return data;
  }
}
